package com.warm.demo.ws;

import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.annotation.WebSocket;
import org.noear.solon.validation.annotation.Valid;

@Valid
@Controller
public class WsDemoController {
    @WebSocket
    @Mapping("/demo/ws/controller/{id}")
    public String demo(String id, String cmd) throws Exception {
        // id 为 path var；cmd 为 query var

        return "Hello world!";
    }
}